<template>
  <div class="cart">
    <nav-bar class="nav-bar">
      <div slot="center">购物车({{ cartLength }})</div>
    </nav-bar>

    <scroll class="wrapper">
      <cart-list />
    </scroll>

    <cart-botton-bar />
  </div>
</template>

<script>
import NavBar from "components/common/navbar/NavBar.vue";
import CartList from "./childComps/CartList.vue";
import CartBottonBar from "./childComps/CartBottonBar.vue";

import Scroll from "../../components/common/scroll/Scroll.vue";

export default {
  name: "Cart",
  components: {
    NavBar,
    CartList,
    CartBottonBar,

    Scroll,

  },
  data() {
    return {};
  },
  computed: {
    cartLength() {
      return this.$store.state.cartList.length;
    },
    cartList() {
      return this.$store.state.cartList;
    },
  },
  methods: {},
};
</script>
<style scoped>
.nav-bar {
  background-color: #ff8198;
}

.wrapper {
  height: calc(100vh - 44px - 49px - 44px);
  /* height: 500px; */
  overflow: hidden;
}
</style>
